package com.xiaohao.communication.controller;

import com.xiaohao.communication.bean.WorkClassifications;
import com.xiaohao.communication.daoImpl.WorkClassificationDaoImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class WorkClassificationsController {

    @Autowired
    private WorkClassificationDaoImpl workClassificationDaoImpl;

    @GetMapping("/find-all-workClassifications")
    public List<WorkClassifications> findAll() {
        return workClassificationDaoImpl.findAll();
    }

    @GetMapping("/find-workClassifications-type")
    public WorkClassifications findByType(String type) {
        return workClassificationDaoImpl.findByType(type);
    }
}
